# Contributor: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
# Maintainer: Iztok Fister, Jr. <iztok@iztok-jr-fister.eu>
pkgname=py3-habanero
_pkgorig=habanero
pkgver=1.2.3
pkgrel=3
pkgdesc="A low level client for working with Crossref’s search API"
url="https://github.com/sckott/habanero"
arch="noarch"
license="MIT"
depends="python3 py3-requests py3-tqdm"
makedepends="py3-gpep517 py3-setuptools_scm py3-wheel"
checkdepends="py3-pytest py3-pytest-cov"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://files.pythonhosted.org/packages/source/h/habanero/habanero-$pkgver.tar.gz"
builddir="$srcdir/$_pkgorig-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

# do not test network tests; use smoke tests
check() {
	PYTHONPATH=build/lib python3 -c "from habanero import *"
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
ec6e4073fe811d4b4f59642906372ae32872b254f295935f60a0a98d35b4e2511b49a64a2c2b21b384bc99a5671d1a67fb8baf10b0e6755cea14af54b6f2f881  py3-habanero-1.2.3.tar.gz
"
